package cn.ryh.fileupload.entity;

import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * @author Rao
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Success extends Result {

    private Boolean success=Boolean.TRUE;

    private String message;

    private Number total;

    private Object data;

    private Object ext;

    public Success() {
    }

    public Success(String message) {
        this.message=message;
    }

    public Success(Object data, String message) {
        this(message);
        this.data=data;
    }

    public Success(Object data, Number total) {
        this.data=data;
        this.total=total;
    }

    public Success(Object data, Object ext, String message) {
        this(message);
        this.data=data;
        this.ext=ext;
    }

    public Success(Object data, Object ext, Number total) {
        this.data=data;
        this.total=total;
        this.ext=ext;
    }

    @Override
    public Boolean getSuccess() {
        return success;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Number getTotal() {
        return total;
    }

    public Object getData() {
        return data;
    }

    public Object getExt() {
        return ext;
    }

}
